package uvt.map.graph.algorithm;

import java.util.ArrayList;

import uvt.map.graph.FromWithOnTo;
import uvt.map.graph.Node;

public class FromWithOnToList extends ArrayList<FromWithOnTo> {
	
	public FromWithOnToList() {
	}
	
	public ArrayList<FromWithOnTo> getRoadsFrom(Node start) {
		ArrayList<FromWithOnTo> list = new ArrayList<FromWithOnTo>();
		for(FromWithOnTo obj : this) {
			if(obj.getFrom().getName().equals(start.getName()))
				list.add(obj);
		}
		return list;
	}

}
